package com.odin.core.controller;


import com.odin.core.dao.ResourceDAO;
import com.odin.core.entity.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/resource")
public class ResourceController {

    @Autowired
    ResourceDAO resourceDAO;
    @RequestMapping("/get")
    public List<Resource> findByRoleId(String roleId){
        return   resourceDAO.findByRoleId(roleId);
    }
}
